package com.yxw.springmvc.userBehavior.controller;

import com.yxw.springmvc.userBehavior.model.BasicRole;
import com.yxw.springmvc.userBehavior.request.BasicRoleAddRequest;
import com.yxw.springmvc.userBehavior.service.BasicRoleManageService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

/**
 * Created by hp on 2016/9/26.
 */
@Controller
@RequestMapping("/basicRole")
public class BasicRoleManageController {

    @Resource
    private BasicRoleManageService basicRoleManageService;

    @RequestMapping("/add")
    @ResponseBody
    public BasicRole add (BasicRoleAddRequest  request){
        BasicRole role = basicRoleManageService.add(request);
        return role;
    }
}
